Which of the following is correct slicing operation to extract every kth character from the string str1 starting from n and ending at m-1.

Python - Online Exam Test Papers | Python - MCQs[multiple choice questions and answers ] | Python - Mock Test Papers | Python - Practice Papers | Python - Sample Test Papers |

Question:
Which of the following is correct slicing operation to extract every kth character from the string str1 starting from n and ending at m-1.

1.str1[: : k]

2.str1[n : m+1 : k]

3.str1[n : m : k ]

4.str1[m : n : k ]

Posted Date:-2021-12-11 19:10:01


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!